package com.hrpc.transport.message;

import java.io.Serializable;

/**
 * 他用来描述请求调用方所请求的接口方法的描述
 */
public class RequestPayload implements Serializable {
    //1.接口的名字
    private  String interfaceName;//--->{ com.hRpc.HelloRpc}
    //2.方法的名字
    private String methodName;
    //3.参数列表：参数类型和具体的参数
    //参数类型，用来确定重载方法，具体参数用来执行方法调用
    private Class<?>[] parametersType;//-->{java.lang.String}
    private Object[] parametersValue;
    //4.返回值的封装
    private Class<?> returnType;//-->{java.lang.String}

    public String getInterfaceName() {
        return interfaceName;
    }

    public void setInterfaceName(String interfaceName) {
        this.interfaceName = interfaceName;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public Class<?>[] getParametersType() {
        return parametersType;
    }

    public void setParametersType(Class<?>[] parametersType) {
        this.parametersType = parametersType;
    }

    public Object[] getParametersValue() {
        return parametersValue;
    }

    public void setParametersValue(Object[] parametersValue) {
        this.parametersValue = parametersValue;
    }

    public Class<?> getReturnType() {
        return returnType;
    }

    public void setReturnType(Class<?> returnType) {
        this.returnType = returnType;
    }

    public RequestPayload() {
    }

    public RequestPayload(String interfaceName, String methodName, Class<?>[] parametersType, Object[] parametersValue, Class<?> returnType) {
        this.interfaceName = interfaceName;
        this.methodName = methodName;
        this.parametersType = parametersType;
        this.parametersValue = parametersValue;
        this.returnType = returnType;
    }
}
